<template>
  <el-select v-model="value" @change="change">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value"
    >
    </el-option>
  </el-select>
</template>

<script>
export default {
  name: "Link3",
  data() {
    return {
      options: [
        {
          value: "1",
          label: "中华人民共和国教育部",
          link: "http://www.moe.gov.cn/",
        },
        {
          value: "2",
          label: "中国高职高专教育网",
          link: "http://www.tech.net.cn/",
        },
        {
          value: "3",
          label: "山东省教育厅",
          link: "http://www.sdedu.gov.cn/",
        },
        {
          value: "4",
          label: "山东水利网",
          link: "http://www.sdwr.gov.cn/",
        },
        {
          value: "5",
          label: "山东省高职高专教育网",
          link: "http://www.sdgzgz.cn/",
        },
        {
          value: "6",
          label: "水利部12314监督举报平台",
          link: "http://supe.mwr.gov.cn/#/",
        },
      ],
      value: "- - - - -友情链接- - - - -",
    };
  },
  methods: {
    change(value) {
      let obj = {};
      obj = this.options.find((item) => {
        return item.value === value;
      });
      this.value = obj.label;
      window.location.href = obj.link;
    },
  },
};
</script>
